package com.tchy.cloud.entity;

import javax.persistence.*;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * Created by xiaoji on 2017/2/20.
 */
@Entity
@Table(name = "a_questions", schema = "", catalog = "")
public class AQuestionsEntity {
    private Long questionsId;
    private ACustomerEntity customer;
    private String title;
    private String content;
    private Date quesTime;
    private Integer reply;
    private Integer praise;
    private Integer shareNumber;
    private String quesColumns;
    private Integer labelInfo;
    private Integer isAnonymous;
    private String quesColumnsId;

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "questions_id")
    public Long getQuestionsId() {
        return questionsId;
    }

    public void setQuestionsId(Long questionsId) {
        this.questionsId = questionsId;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "customer_id")
    public ACustomerEntity getCustomer() {
        return customer;
    }

    public void setCustomer(ACustomerEntity customer) {
        this.customer = customer;
    }


    @Basic
    @Column(name = "title")
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Basic
    @Column(name = "content")
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Basic
    @Column(name = "ques_time")
    public Date getQuesTime() {
        return quesTime;
    }

    public void setQuesTime(Date quesTime) {
        this.quesTime = quesTime;
    }

    @Basic
    @Column(name = "reply")
    public Integer getReply() {
        return reply;
    }

    public void setReply(Integer reply) {
        this.reply = reply;
    }

    @Basic
    @Column(name = "praise")
    public Integer getPraise() {
        return praise;
    }

    public void setPraise(Integer praise) {
        this.praise = praise;
    }

    @Basic
    @Column(name = "share_number")
    public Integer getShareNumber() {
        return shareNumber;
    }

    public void setShareNumber(Integer shareNumber) {
        this.shareNumber = shareNumber;
    }

    @Basic
    @Column(name = "ques_columns")
    public String getQuesColumns() {
        return quesColumns;
    }

    public void setQuesColumns(String quesColumns) {
        this.quesColumns = quesColumns;
    }

    @Basic
    @Column(name = "label_info")
    public Integer getLabelInfo() {
        return labelInfo;
    }

    public void setLabelInfo(Integer labelInfo) {
        this.labelInfo = labelInfo;
    }

    @Basic
    @Column(name = "is_anonymous")
    public Integer getIsAnonymous() {
        return isAnonymous;
    }

    public void setIsAnonymous(Integer isAnonymous) {
        this.isAnonymous = isAnonymous;
    }

    @Basic
    @Column(name = "ques_columns_id")
    public String getQuesColumnsId() {
        return quesColumnsId;
    }

    public void setQuesColumnsId(String quesColumnsId) {
        this.quesColumnsId = quesColumnsId;
    }

}
